package top.wshape1.rpc.loadbalance;

import top.wshape1.rpc.common.entity.ServiceMeta;

import java.util.List;

/**
 * @author Wshape1
 * @version 1.0
 * @description 负载均衡
 * @since 2024-02-10
 */

public interface LoadBalance {

    /**
     * load balancing
     *
     * @param serviceMetas serviceMeta list
     * @return balanced serviceMeta or null if no serviceMeta found
     */
    ServiceMeta select(List<ServiceMeta> serviceMetas);

}
